//package com.bussiness.controller;
//
//import com.bussiness.dao.SmjjManagerDao;
//import com.bussiness.model.SmjjManagerUserEntity;
//import com.common.response.ResponseBean;
//import com.common.response.impl.BaseResponseImpl;
//import com.github.pagehelper.PageHelper;
//import com.github.pagehelper.PageInfo;
//import com.mybaits.config.DBIdentifier;
//import com.mybaits.config.DataUrlMap;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiImplicitParams;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.annotation.Resource;
//import java.util.List;
//
///**
// * @description: 测试
// * @author: zyj
// * @create: 2019-11-27 14:45
// **/
//@RestController
//@Api(value = "swagger测试")
//@RequestMapping("/mybaitis")
//public class Mybaitis  extends BaseResponseImpl {
//
//    @Autowired
//    public SmjjManagerDao smjjManagerDao;
//
//    @ApiOperation(value = "登录")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "userName", value = "用户名", required = true, dataType = "String")})
//    @GetMapping("/testSwagger")
//    public void testSwagger(String userName){
//        System.out.println("成功");
//    }
//
//    @ApiOperation(value = "数据库测试")
//    @GetMapping("/testDatabase")
//    public ResponseBean testDatabase(){
//        PageHelper.startPage(1, 3);//第一条开始取数，取三条数据
//        List<SmjjManagerUserEntity> smjjManagerUserEntity = smjjManagerDao.selectManagerUser();
//        PageInfo<SmjjManagerUserEntity> page = new PageInfo<SmjjManagerUserEntity>(smjjManagerUserEntity);
//        return successData(page);
//    }
//
//    @ApiOperation(value = "切库")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "code", value = "数据库名", required = true, dataType = "String")})
//    @GetMapping("/testChangeData")
//    public SmjjManagerUserEntity testChangeData(String code){
//        DBIdentifier.setProjectCode(DataUrlMap.getMap(code));
//        SmjjManagerUserEntity smjjManagerUserEntity = smjjManagerDao.selectByPrimaryKey(1000001L);
//        return smjjManagerUserEntity;
//    }
//
//}
